package ONLINE_EXAM;

import java.io.BufferedReader;

public class ali {
    public static void main(String[] args) {
        ali test = new ali();
        System.out.println(Integer.bitCount(13));
    ali.help(13);;

    }

    /**
     * 判断num有几个1 如果结果==k 返回1 否则为0
     * @param num
     * @param k
     * @return
     */
    public static int helper(int num,int k){
        int count = 0;
        while (num != 0){
            num &=(num-1);
            count++;
        }
        return count;
    }
    public static void help(int num){
        StringBuilder sb= new StringBuilder();
        while (num!= 0){
            sb.append(num%2) ;
            num = num/2;

        }
        sb.length();
        System.out.println(sb.toString());

    }
}
